home *** CD-ROM | disk | FTP | other *** search
/ Champak 132 (Alt) / Vol 132.iso / games / 3d_hyper / 3d_hyper.dcr / Scripts_19_Course Screen.ls < prev    next >
Encoding:
Text File  |  2011-06-09  |  1.1 KB  |  56 lines

  1. property pPlaceToGo, pTimeLeaving, pReadyToGo
  2. global gHaveSound, gCurrTrack
  3.  
  4. on beginSprite me
  5.   pTimeLeaving = 0
  6.   updateTimeInfo()
  7.   stopSounds()
  8. end
  9.  
  10. on exitFrame me
  11.   exitKeysPressed()
  12.   if the shiftDown then
  13.     sendAllSprites(#keyWasPressed, #Shift, "Shift")
  14.   else
  15.     if the controlDown then
  16.       sendAllSprites(#keyWasPressed, #Control, "Control")
  17.     else
  18.       if the optionDown then
  19.         sendAllSprites(#keyWasPressed, #ALT, "Alt")
  20.       end if
  21.     end if
  22.   end if
  23.   if (the milliSeconds > pTimeLeaving) and (pTimeLeaving > 0) then
  24.     if pReadyToGo then
  25.       go(pPlaceToGo)
  26.     else
  27.       pReadyToGo = 1
  28.       go(the frame)
  29.     end if
  30.   else
  31.     go(the frame)
  32.   end if
  33. end
  34.  
  35. on beginMusic me
  36.   if gHaveSound then
  37.     sound(1).play(member("cracermusic"))
  38.     sound(1).volume = 120
  39.   end if
  40. end
  41.  
  42. on startPressed me
  43.   if gCurrTrack < 2 then
  44.     me.LeaveFrame("Load Course")
  45.   else
  46.     me.LeaveFrame("Menu")
  47.   end if
  48. end
  49.  
  50. on LeaveFrame me, whichFrame
  51.   timeToLeave = 1500
  52.   sendAllSprites(#LeaveThisFrame, timeToLeave)
  53.   pPlaceToGo = whichFrame
  54.   pTimeLeaving = the milliSeconds + timeToLeave
  55. end
  56.